/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session;

import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author owtee
 */
@Stateless
public class ReportFacade {

    @PersistenceContext(unitName = "MSGPU")
    private EntityManager em;

    public ReportFacade() {
    }

    public List<Object> callSpMsgGetFinishJob(Date dFinish) {
        em.getEntityManagerFactory().getCache().evictAll();
        return em.createNativeQuery("{CALL sp_Msg_Get_FinishJob(?)}").setParameter(1, dFinish).getResultList();
    }
}
